package com.glory.cqaospda.adapter;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;
import com.glory.cqaospda.R;
import com.glory.cqaospda.bean.QueryEqpInfoBean;

import org.jetbrains.annotations.NotNull;

import java.util.List;

import androidx.annotation.Nullable;

/**
 * @author lenovo
 */
public class EqpInfoAdapter extends BaseQuickAdapter<QueryEqpInfoBean.TesterList, BaseViewHolder> {

    private List<QueryEqpInfoBean.TesterList> datalist;

    public EqpInfoAdapter(@Nullable List<QueryEqpInfoBean.TesterList> data) {
        super(R.layout.adapter_eqpinfo, data);
        datalist = data;
    }

    @Override
    protected void convert(BaseViewHolder helper, QueryEqpInfoBean.TesterList item) {

        helper.setText(R.id.tvPost, String.valueOf(helper.getAdapterPosition() + 1));
        helper.setText(R.id.tvTestName, item.getMTestName());
        helper.setText(R.id.tvTestProgram, item.getMTestProgram());
        helper.setText(R.id.tvMESstate, item.getMMesState());
    }
}
